import request from '@/utils/request'
//数据获取
export function getList(data) {
  return request({
    url: '/admin/role/list',
    method: 'get',
    params: data
  })
}
//编辑
export function redact(data){
    return request({
        url:'/admin/role/update',
        method:'post',
        data
    })
}
//添加
export function add(data){
    return request({
        url:'/admin/role/create',
        method:'post',
        data
    })
}
//删除
export function del(data){
    return request({
        url:'/admin/role/delete',
        method:'post',
        data
    })
}
//搜索
export function search(data){
    return request({
        url:'/admin/role/list',
        method:'get',
        params:data
    })
}
// 授权列表获取
export function grant(data){
    return request({
        url:'/admin/role/permissions',
        method:'get',
        params:{roleId:data}
    })
}
//授权上传
export function updatetx(data){
    return request({
        url:'/admin/role/permissions',
        method:'post',
        data
    })
}